<template>
  <div class="security">
    <div class="header h-bor-top">
      <div class="content">
        <div  class="crumb">
          <router-link to='/mycenter/security' class="alink">
          <i  class="el-icon-arrow-left"></i>
          安全记录</router-link>
        </div>
      </div>
    </div>
    <!-- cont-body -->
    <div  class="trunk">
      <div   class="l-table">
        <h2  class="l-table-title">
          <span  class="l-table-label">登录记录</span>
        </h2>
        <div  class="l-table-body">
          <template>
            <el-table
              :data="loginData"
              style="width: 100%">
              <el-table-column
                prop="wdate"
                label="时间"
                width="230">
              </el-table-column>
              <el-table-column
                prop="type"
                label="登录方式"
                width="180">
              </el-table-column>
              <el-table-column
                prop="address"
                label="地址"
                width="180">
              </el-table-column>
              <el-table-column
                prop="ip"
                label="IP">
              </el-table-column>
            </el-table>
          </template>
        </div>
        <div  class="l-table-page">
          <span  class="is-disabled"></span>
          <span  class></span>
        </div>
      </div>
      <div   class="l-table mt16">
        <h2  class="l-table-title">
          <span  class="l-table-label">安全设置记录</span>
        </h2>
        <div  class="l-table-body">
          <template>
            <el-table
              :data="settingData"
              style="width: 100%">
              <el-table-column
                prop="wdate"
                label="日期"
                width="400">
              </el-table-column>
              <el-table-column
                prop="updatelog"
                label="安全设置">
              </el-table-column>
            </el-table>
          </template>
        </div>
        <!---->
      </div>
    </div>
  </div>
</template>
<script>
import VueQr from "vue-qr";
export default {
  components: {
    VueQr
  },
  data() {
    return {
      loginData: [{
            date: '2016-05-02',
            name: 'WEB',
            address: '113.57.67.124'
      },],
      settingData:[],
    };
  },
  watch: {},
  mounted() {
    this.getuserloginlog();
    this.getusersettinglog();
  },
  computed: {},
  methods: {
    // 登录信息 根据用户编号查看历史登录信息
    getuserloginlog(){
      this.request(this.api.getuserloginlog).then(res => {
        if (res.code == "0") {
          this.loginData = res.data;
        }
      });
    },
    // 设置信息
    getusersettinglog(){
      this.request(this.api.getusersettinglog).then(res => {
        if (res.code == "0") {
          this.settingData = res.data;
        }
      });
    },
  }
};
</script>

<style lang="scss" scoped>
.security {
  .header {
    height: 148px;
    background-color: #1b2945;
    .content {
      margin: 0 auto;
      padding-top: 43px;
      width: 1200px;
      i{color: #357ce1;font-weight: 600;}
      .crumb {
          margin: 0 auto;
          padding-top: 50px;
          width: 1200px;
          color: #d2d6ec;
          line-height: 16px;
          font-size: 16px;
      }
    }
  }
}
// cont_body
.trunk {
  margin: 24px auto 146px;
  width: 1200px;
  font-size: 12px;
  box-sizing: border-box;
  .l-table {
    border-radius: 2px;
    border: 1px solid #e6ecf2;
    background-color: #fff;
  }
  .l-table-title {
    display: flex;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -ms-flex-align: center;
    align-items: center;
    padding: 0 24px;
    font-size: 14px;
    min-height: 48px;
    border-bottom: 1px solid #e6ecf2;
    background-color: #f2f6fa;
  }
}
.mt16{margin-top: 36px;}
</style>